package com.cheng.example.atguigu.design_pattern.visitor;

/*
 * @author 程帅
 * @createTime: 2020/11/8 20:13
 * @Created: with IntelliJ IDEA.
 */
public class Client {

    public static void main(String[] args) {
        ObjectStruture objectStruture = new ObjectStruture();

        objectStruture.attach(new Man());
        objectStruture.attach(new Woman());

        //成功
        Success success = new Success();
        objectStruture.display(success);

        System.out.println("=============");

        //失败
        Fail fail = new Fail();
        objectStruture.display(fail);

        System.out.println("=============");

        //待定
        Wait wait = new Wait();
        objectStruture.display(wait);

    }
}
